package com.bawei.yangzongcai___chenmei.BlankFragment.BannerLunboImg;


import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.Toast;

import com.bawei.yangzongcai___chenmei.MVC.BsaeFragment;
import com.bawei.yangzongcai___chenmei.R;
import com.blankj.utilcode.util.ToastUtils;
import com.bumptech.glide.Glide;
import com.youth.banner.Banner;
import com.youth.banner.BannerConfig;
import com.youth.banner.Transformer;
import com.youth.banner.listener.OnBannerListener;
import com.youth.banner.loader.ImageLoader;

import java.util.ArrayList;


public class BannerLunBoImag003 extends BsaeFragment {


    private Banner lunbo003Banner;
    private ImageView lunbo003Handing;

    @Override
    public int bandLayout() {
        return R.layout.fragment_blank_banner_img3;
    }

    @Override
    public void initView() {

        lunbo003Banner = findbandid(R.id.lunbo003_banner);
        lunbo003Handing = findbandid(R.id.lunbo003_handing);
    }

    @Override
    public void initDate() {

        lunbo003Handing.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ToastUtils.showShort("尽己所能   不止前行 ！！");
            }
        });
        ArrayList<Integer> integers = new ArrayList<>();
        integers.add(R.drawable.handing8);
        integers.add(R.drawable.handing3);
        integers.add(R.drawable.handing4);
        integers.add(R.drawable.handing7);
        integers.add(R.drawable.handing8);
        lunbo003Banner.setBannerAnimation(Transformer.FlipVertical);
        lunbo003Banner.setIndicatorGravity(BannerConfig.CENTER);
        lunbo003Banner.setImages(integers);
        lunbo003Banner.setBannerStyle(BannerConfig.CIRCLE_INDICATOR);
        lunbo003Banner.setImageLoader(new ImageLoader() {
            @Override
            public void displayImage(Context context, Object path, ImageView imageView) {
                imageView.setImageResource((Integer) path);
            }
        }).start();




    }


}
